<?php

 class __module_menu_api {
 	
 	function getMenu() {
 		
 		$res = __driver_db::si()->query("SELECT m.* FROM `menu` m ORDER BY m.`sort` ASC");
		
 		$i = 0;
                while($row = &$res->fetchRow(DB_FETCHMODE_ASSOC)) {
                        if(drv(ACSGP)->doIHaveAccess($row['access']) !== true) continue;
                
                	$i++;
                	
                	$ret[$i] = $row;
                	$ret[$i]['echoname'] = $row['name_'.DEFAULT_LANGUAGE];
        	
                }
        
                return $ret;
 	}
 	
 }
